home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-05
/
wait4f.zip
/
W4F-SAMP.BAT
< prev
next >
Wrap
DOS Batch File
|
1991-12-05
|
1KB
|
37 lines
@ECHO OFF
WAIT4FIL %1 %2 %3
IF ERRORLEVEL 2 GOTO EscPressed
IF ERRORLEVEL 1 GOTO LimitReached
IF ERRORLEVEL 0 GOTO SyntaxError
GOTO Okay2Process
REM -----------------------------------------------------------------------
:Okay2Process
ECHO File's Here! Processing It!
ECHO This is where you would place commands to be executed when (and IF)
ECHO the file ever appears
GOTO ExitBat
REM -----------------------------------------------------------------------
:EscPressed
ECHO You've pressed ESC to stop waiting before the file actually appeared
GOTO ExitBat
REM -----------------------------------------------------------------------
:LimitReached
ECHO Waited Too Long. File Never Appeared!
ECHO You've waited long enough and the file hasn't appeared yet. This is
ECHO where you would place whatever commands should be executed if the
ECHO expected file NEVER appears.
GOTO ExitBat
REM -----------------------------------------------------------------------
:SyntaxError
PAUSE
CLS
ECHO You must include at LEAST a file name on the command line when running
ECHO this Batch Program
GOTO ExitBat
REM -----------------------------------------------------------------------
:ExitBat
ECHO -----------------------------------------------------------------------
ECHO Batch Program Terminated
ECHO -----------------------------------------------------------------------